<!DOCTYPE>
<html xmlns:th="http://www.thymeleaf.org">
<head>
    <meta content="text/html; charset=utf-8" http-equiv="Content-Type"/>
    <title>考勤管理系统</title>
    <link href="/css/style1.css" rel="stylesheet" type="text/css"/>
    <link href="/css/body.css" rel="stylesheet" type="text/css"/>
    <script src="/js/jquery.js"></script>
    <script src="/js/jquery.cookie.js"></script>


</head>
<body>
<div class="container">
    <section id="content">
        <form action="/user-login" method="post">
            <h1>考勤管理系统</h1>
            <div>
                <input id="username" name="account" placeholder="用户名" required="" type="text"/>
            </div>
            <div>
                <input id="password" name="password" placeholder="密码" required="" type="password"/>
            </div>
            <div class="">
                <span class="help-block u-errormessage" id="js-server-helpinfo">&nbsp;</span></div>
            <div>
                <!-- <input type="submit" value="Log in" /> -->
                <input class="btn btn-primary" id="js-btn-login" type="submit" value="登录"/>
                <label> <input checked="checked" name="rememberMe" type="checkbox" value="rememberMe"/>记住密码</label>
                <label> <input name="autoLogin" type="checkbox" value="autoLogin"/>自动登录</label>
            </div>
            <div th:if="${fail!=null}">
                <p style="color: red;" th:text="${fail}"></p>
            </div>
        </form><!-- form -->

    </section><!-- content -->
</div>
<br><br><br><br>

</body>
</html>
<script>


    $("#username").val($.cookie("username"))
    $("#password").val($.cookie("password"))

    if ($.cookie("autoLogin") == 'autoLogin') {
        document.forms[0].submit();
    }


</script>